<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>编辑学生</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
    <script type="text/javascript">
        function display_alert()
        {
            alert("编辑成功!!")
        }
    </script>
</head>

<body>
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0">
    <a class="navbar-brand col-sm-3 col-md-2 mr-0" href="http://getbootstrap.com/docs/4.0/examples/dashboard/#">编辑学生页面</a>

    <ul class="navbar-nav px-3">
        <li class="nav-item text-nowrap">
            <a class="nav-link" th:text="|${session.username} 退出|" th:href="@{/logout}"></a>
        </li>
    </ul>
</nav>

<div class="container-fluid">
    <div class="row">
        <nav class="col-md-2 d-none d-md-block bg-light sidebar">
            <div class="sidebar-sticky">
                <ul class="nav flex-column">
                    <li class="nav-item">
                        <a class="nav-link"  th:href="@{/main}">
                            <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home">
                                <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
                                <polyline points="9 22 9 12 15 12 15 22"></polyline>
                            </svg>
                            回到首页 <span class="sr-only">(current)</span>
                        </a>
                    </li>

                </ul>
            </div>
        </nav>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">

            <form th:action=@{/student/update} method=post>

                <div class="form-group">
                    <lable>学号</lable>
                    <input type="text" th:value="${stu.getStuId()}" class="form-control" name="stuId"/>
                </div>

                <div class="form-group">
                    <lable>姓名</lable>
                    <input type="text" th:value="${stu.getStuName()}" class="form-control" name="stuName"/>
                </div>

                <div class="form-group">
                    <lable>性别</lable><br/>
                    <div class="form-check form-check-inline">
                        <input th:checked="${stu.getSex()==1}" class="form-check-input" type="radio" name="sex" value="1"/>
                        <lable class="form-check-label">男</lable>
                    </div>
                    <div class="form-check form-check-inline">
                        <input th:checked="${stu.getSex()==0}" class="form-check-input" type="radio" name="sex" value="0"/>
                        <lable class="form-check-label">女</lable>
                    </div>
                </div>


                <div class="form-group">
                    <lable>联系方式</lable>
                    <input type="tel" th:value="${stu.getPhoneNumber()}" class="form-control" name="phoneNumber"/>
                </div>

                <div class="form-group">
                    <lable>宿舍号</lable>
                    <input type="text" th:value="${stu.getDormitoryId()}" class="form-control" name="dormitoryId"/>
                </div>

                <div class="form-group">
                    <lable>班级编号</lable>
                    <input type="text" th:value="${stu.getClazzId()}" class="form-control" name="clazzId"/>

                </div><div class="form-group">
                <lable>年级</lable>
                <input type="text" th:value="${stu.getGrade()}" class="form-control" name="grade"/>
            </div>

                <button onclick="display_alert()" type=submit class=btn btn-primary on>编辑</button>
            </form>

        </main>
    </div>
</div>

</body>

</html>